package vista;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


public class ListaDePreciosAlta extends javax.swing.JFrame {


	private static final long serialVersionUID = 1L;

	
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				ListaDePreciosAlta inst = new ListaDePreciosAlta();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public ListaDePreciosAlta() {
		super();
		initGUI();
		CentrarJFrame();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setResizable(false);
			pack();
			setSize(400, 300);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private void CentrarJFrame(){
		
	    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
	    
	    
	    int w = this.getSize().width;
	    int h = this.getSize().height;
	    int x = (dim.width-w)/2;
	    int y = (dim.height-h)/2;
	    
	    
	    this.setLocation(x, y);
	}
}
